﻿<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:asp="remove">
  
  <xsl:output method="xml" indent="yes" encoding="utf-8" omit-xml-declaration="yes"/>
  <xsl:template match="/">
    <table class="adminform">
      <tr>
        <td>
          <table class="admintable"  >
            <xsl:for-each select="//param">
              <tr>
                <td class="key">
                  <xsl:value-of select="@label" />
                  <xsl:if test="@required = 'yes'">
                    <asp:RequiredFieldValidator ErrorMessage="Required 
                Field" runat="server" ControlToValidate="{@name}" />
                  </xsl:if>
                </td>
                <td>
                  <xsl:if test="@type='text'">
                    <asp:TextBox id="{@name}" runat="server" Text="{@default}" />
                  </xsl:if>
                  <xsl:if test="@type='editor'">
                    <!--<asp:TextBox id="{@name}"  TextMode="MultiLine" Width="{@width}" Height="{@height}" runat="server" Text="{@default}" />-->

                    <asp:FCKeditor  ID="{@name}" BasePath="~/Components/fckeditor/" Width="{@width}" Height="{@height}"  ToolbarSet="Basic" runat="server">
                    </asp:FCKeditor>

                  </xsl:if>
                  
                  <xsl:if test="@type='checkbox'">
                    <asp:CheckBox ID="{@name}" runat="server" />
                  </xsl:if>
                  <xsl:if test="@type='radio'">
                    <asp:RadioButtonList id="{@name}" runat="server">
                      <xsl:for-each select="option">
                        <asp:ListItem Value="{@value}">
                          <xsl:value-of select="@label"/>
                        </asp:ListItem>
                      </xsl:for-each>
                    </asp:RadioButtonList>
                  </xsl:if>
                </td>
              </tr>
            </xsl:for-each>
          </table>
        </td>
      </tr>
    </table>

  </xsl:template>
</xsl:stylesheet>
